<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Abstract_table_row</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Abstract_table_row</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
							<a href="#sec-descendents">Descendents</a>
			|											<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Abstract class for table rows.</p>
	<ul class="tags">
				<li><span class="field">author:</span> Andrej Jursa</li>
				<li><span class="field">version:</span> 1.0</li>
				<li><span class="field">copyright:</span> FMFI Comenius University in Bratislava 2012</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_core---abstract_table_row.php.html">/core/abstract_table_row.php</a> (line <span class="field"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a15">15</a></span>)
		</p>
		
				
		<pre><a href="../../Abstract/Core/Abstract_table_core.html">Abstract_table_core</a>
   |
   --Abstract_table_row</pre>
	
			</div>
</div>

	<a name="sec-descendents"></a>
	<div class="info-box">
		<div class="info-box-title">Direct descendents</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
			<span class="disabled">Descendents</span>
			|												<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
								|															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<table cellpadding="2" cellspacing="0" class="class-table">
				<tr>
					<th class="class-table-header">Class</th>
					<th class="class-table-header">Description</th>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../../TableModels/Admins_table_row.html">Admins_table_row</a></td>
					<td>
											
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../../TableModels/Answers_table_row.html">Answers_table_row</a></td>
					<td>
											
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../../TableModels/Images_table_row.html">Images_table_row</a></td>
					<td>
											
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../../TableModels/Inventions_table_row.html">Inventions_table_row</a></td>
					<td>
											
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../../TableModels/Logs_table_row.html">Logs_table_row</a></td>
					<td>
											
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../../TableModels/Miniapps_table_row.html">Miniapps_table_row</a></td>
					<td>
											
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../../TableModels/Miniapp_files_table_row.html">Miniapp_files_table_row</a></td>
					<td>
											
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../../TableModels/Periods_table_row.html">Periods_table_row</a></td>
					<td>
											
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../../TableModels/Physicists_table_row.html">Physicists_table_row</a></td>
					<td>
											
										</td>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../../TableModels/Questions_table_row.html">Questions_table_row</a></td>
					<td>
											
										</td>
				</tr>
							</table>
		</div>
	</div>


	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																																<div class="var-title">
					<span class="var-type">array<mixed></span>
					<a href="#$data" title="details" class="var-name">$data</a>
				</div>
																<div class="var-title">
					<span class="var-type">array<mixed></span>
					<a href="#$original_data" title="details" class="var-name">$original_data</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$primary_field" title="details" class="var-name">$primary_field</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$table_name" title="details" class="var-name">$table_name</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																																																																												
												<div class="method-definition">
											<span class="method-result">Abstract_table_row</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											([<span class="var-type">array<mixed></span>&nbsp;<span class="var-name">$original_data</span> = <span class="var-default">NULL</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#data" title="details" class="method-name">data</a>
											([<span class="var-type">NULL|string|array<mixed></span>&nbsp;<span class="var-name">$column</span> = <span class="var-default">NULL</span>], [<span class="var-type">NULL|string|bool|numeric|<a href="../../Abstract/Core/Nonescape_data.html">Nonescape_data</a></span>&nbsp;<span class="var-name">$new_value</span> = <span class="var-default">NULL</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#delete" title="details" class="method-name">delete</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#determineTableColumns" title="details" class="method-name">determineTableColumns</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#determineTableName" title="details" class="method-name">determineTableName</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">array<mixed></span>
										<a href="#getDataForEditor" title="details" class="method-name">getDataForEditor</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">integer</span>
										<a href="#getId" title="details" class="method-name">getId</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#getTableName" title="details" class="method-name">getTableName</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#init" title="details" class="method-name">init</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#load" title="details" class="method-name">load</a>
											(<span class="var-type">integer</span>&nbsp;<span class="var-name">$id</span>, [<span class="var-type">array<integer></span>&nbsp;<span class="var-name">$excludet_ids</span> = <span class="var-default">array()</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#loadBy" title="details" class="method-name">loadBy</a>
											(<span class="var-type">string|array<mixed></span>&nbsp;<span class="var-name">0</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#onDelete" title="details" class="method-name">onDelete</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result"><a href="../../Abstract/Core/Abstract_table_row.html">Abstract_table_row</a></span>
										<a href="#prepareEditorSave" title="details" class="method-name">prepareEditorSave</a>
											(<span class="var-type">array<mixed></span>&nbsp;<span class="var-name">$formdata</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#resetRelations" title="details" class="method-name">resetRelations</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#save" title="details" class="method-name">save</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result"><a href="../../Abstract/Core/Abstract_table_row.html">Abstract_table_row</a></span>
										<a href="#setId" title="details" class="method-name">setId</a>
											(<span class="var-type">integer</span>&nbsp;<span class="var-name">$id</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array<string>|NULL</span>
										<a href="#_getKnownFields" title="details" class="method-name">_getKnownFields</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#_setKnownFields" title="details" class="method-name">_setKnownFields</a>
											(<span class="var-type">array<string></span>&nbsp;<span class="var-name">$fields</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#__call" title="details" class="method-name">__call</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">array<mixed></span>&nbsp;<span class="var-name">$arguments</span>)
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$data" id="$data"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array<mixed></span>
			<span class="var-name">$data</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a30">30</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">var:</span> currently unsaved pairs of column =&gt; value in one row of table represented by this class.</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$original_data" id="$original_data"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array<mixed></span>
			<span class="var-name">$original_data</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a35">35</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">var:</span> current pairs of column =&gt; value in one row of table represented by this class.</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$primary_field" id="$primary_field"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$primary_field</span>
			 = <span class="var-default"> 'id'</span>			(line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a25">25</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">var:</span> name of column in table, which is primary key.</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$table_name" id="$table_name"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$table_name</span>
			 = <span class="var-default"> NULL</span>			(line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a20">20</a></span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">var:</span> name of table represented by this class.</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a42">42</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Constructor of _table_row classes.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Abstract_table_row</span>
		<span class="method-name">
			__construct
		</span>
					([<span class="var-type">array<mixed></span>&nbsp;<span class="var-name">$original_data</span> = <span class="var-default">NULL</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array<mixed></span>
				<span class="var-name">$original_data</span><span class="var-description">: array of original values or NULL for leaving original values blank.</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddata" id="data"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">data</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a254">254</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Multipurpose function, based on given arguments.</p>
<p class="description"><p>If you omit both arguments, this function returns array of original data from table row.  If you specify first argument as string and leaves second intact, you will receive value of given column from table row.  If you specify first argument as array of string =&gt; string | bool | numeric | Nonescape_data and leaves second intact,  you will set new values of table column from given array and function returns reference to this object.  If you specify both arguments, first must be string and second can be string | bool | numeric | Nonescape_data, you will  set new value of table column for given column and value, and you will receive reference to this object.</p><p>Any other combination of arguments can trigger error or do nothing, just return reference to this object.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> can return array of original data, value of column, NULL or reference to this object.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			data
		</span>
					([<span class="var-type">NULL|string|array<mixed></span>&nbsp;<span class="var-name">$column</span> = <span class="var-default">NULL</span>], [<span class="var-type">NULL|string|bool|numeric|<a href="../../Abstract/Core/Nonescape_data.html">Nonescape_data</a></span>&nbsp;<span class="var-name">$new_value</span> = <span class="var-default">NULL</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">NULL|string|array<mixed></span>
				<span class="var-name">$column</span><span class="var-description">: nothing, column name or array of new column values.</span>			</li>
					<li>
				<span class="var-type">NULL|string|bool|numeric|<a href="../../Abstract/Core/Nonescape_data.html">Nonescape_data</a></span>
				<span class="var-name">$new_value</span><span class="var-description">: nothing or new value of column.</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddelete" id="delete"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">delete</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a220">220</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function deletes table row, but only if there is valid primary index.</p>
<p class="description"><p>You must first call load(), loadBy() or setId() methods.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> TRUE, when table row is deleted, FALSE otherwise.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			delete
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methoddetermineTableColumns" id="determineTableColumns"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">determineTableColumns</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a428">428</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function will read table columns from database table, bot only  when this columns are not known.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			determineTableColumns
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methoddetermineTableName" id="determineTableName"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">determineTableName</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a415">415</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function reads name of database table from name of class, but only  when table_name is set to NULL.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			determineTableName
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetDataForEditor" id="getDataForEditor"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getDataForEditor</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a363">363</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns all available data data to editor.</p>
<p class="description"><p>This method does not returns data from relations!  For relation specified data to be fetched, this method must be overriden.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> data.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array<mixed></span>
		<span class="method-name">
			getDataForEditor
		</span>
				()
			</div>
	
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../../TableModels/Inventions_table_row.html#methodgetDataForEditor">Inventions_table_row::getDataForEditor()</a>
							</li>
					<li>
				<a href="../../TableModels/Miniapps_table_row.html#methodgetDataForEditor">Miniapps_table_row::getDataForEditor()</a>
								: Get editor data.
							</li>
					<li>
				<a href="../../TableModels/Periods_table_row.html#methodgetDataForEditor">Periods_table_row::getDataForEditor()</a>
								: Returns data for editor.
							</li>
					<li>
				<a href="../../TableModels/Physicists_table_row.html#methodgetDataForEditor">Physicists_table_row::getDataForEditor()</a>
							</li>
					<li>
				<a href="../../TableModels/Questions_table_row.html#methodgetDataForEditor">Questions_table_row::getDataForEditor()</a>
							</li>
				</ul>
	</div>
<a name="methodgetId" id="getId"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getId</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a333">333</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns value of primary key (primary index).</p>
	<ul class="tags">
				<li><span class="field">return:</span> primary key value.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">integer</span>
		<span class="method-name">
			getId
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetTableName" id="getTableName"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getTableName</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a352">352</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns name of this table.</p>
	<ul class="tags">
				<li><span class="field">return:</span> table name.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			getTableName
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodinit" id="init"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">init</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a394">394</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Function which can initialize relations.</p>
<p class="description"><p>Called automatically in class constructor.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			init
		</span>
				()
			</div>
	
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../../TableModels/Inventions_table_row.html#methodinit">Inventions_table_row::init()</a>
								: Initialise all relations.
							</li>
					<li>
				<a href="../../TableModels/Logs_table_row.html#methodinit">Logs_table_row::init()</a>
							</li>
					<li>
				<a href="../../TableModels/Miniapps_table_row.html#methodinit">Miniapps_table_row::init()</a>
								: Relations initialise.
							</li>
					<li>
				<a href="../../TableModels/Periods_table_row.html#methodinit">Periods_table_row::init()</a>
								: Initialisation of relations.
							</li>
					<li>
				<a href="../../TableModels/Physicists_table_row.html#methodinit">Physicists_table_row::init()</a>
								: Relation initialisations.
							</li>
					<li>
				<a href="../../TableModels/Questions_table_row.html#methodinit">Questions_table_row::init()</a>
								: Relations initialisation.
							</li>
				</ul>
	</div>
<a name="methodload" id="load"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">load</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a57">57</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function loads one row of database table by given value of primary key (primary index).</p>
	<ul class="tags">
				<li><span class="field">return:</span> return TRUE when table row is found and loaded, FALSE otherwise.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			load
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$id</span>, [<span class="var-type">array<integer></span>&nbsp;<span class="var-name">$excludet_ids</span> = <span class="var-default">array()</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$id</span><span class="var-description">: integer value of primary index in table, should be positive value.</span>			</li>
					<li>
				<span class="var-type">array<integer></span>
				<span class="var-name">$excludet_ids</span><span class="var-description">: array of excludet ids.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodloadBy" id="loadBy"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">loadBy</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a90">90</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function loads one row of database table by given condition.</p>
<p class="description"><p>Condition can be string of WHERE clause in SQL query, or array of values column =&gt; value,  this array is applied each row to active record where method: $this-&gt;db-&gt;where(column, value).</p><p>Function can have more than one parameter, these parameters are replacements of question marks  in WHERE clause, they must be in correct order.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> return TRUE when only one table row matches condition and is loaded, FALSE otherwise.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			loadBy
		</span>
					(<span class="var-type">string|array<mixed></span>&nbsp;<span class="var-name">0</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string|array<mixed></span>
				<span class="var-name">0</span><span class="var-description">: where clause.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodonDelete" id="onDelete"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">onDelete</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a385">385</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Simple function called after delete of this table row record.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			onDelete
		</span>
				()
			</div>
	
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../../TableModels/Answers_table_row.html#methodonDelete">Answers_table_row::onDelete()</a>
							</li>
					<li>
				<a href="../../TableModels/Images_table_row.html#methodonDelete">Images_table_row::onDelete()</a>
								: Delete file from images.
							</li>
					<li>
				<a href="../../TableModels/Miniapps_table_row.html#methodonDelete">Miniapps_table_row::onDelete()</a>
							</li>
					<li>
				<a href="../../TableModels/Miniapp_files_table_row.html#methodonDelete">Miniapp_files_table_row::onDelete()</a>
							</li>
					<li>
				<a href="../../TableModels/Periods_table_row.html#methodonDelete">Periods_table_row::onDelete()</a>
								: Delete image when deleting this record.
							</li>
					<li>
				<a href="../../TableModels/Physicists_table_row.html#methodonDelete">Physicists_table_row::onDelete()</a>
							</li>
					<li>
				<a href="../../TableModels/Questions_table_row.html#methodonDelete">Questions_table_row::onDelete()</a>
								: Delete all answers related and image for this question.
							</li>
				</ul>
	</div>
<a name="methodprepareEditorSave" id="prepareEditorSave"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">prepareEditorSave</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a375">375</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets the date to be saved after editing in editor.</p>
<p class="description"><p>This method does not manipulate with relation.  If you need to manipulate with relations, this method must be overriden.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> reference to this object.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../../Abstract/Core/Abstract_table_row.html">Abstract_table_row</a></span>
		<span class="method-name">
			prepareEditorSave
		</span>
					(<span class="var-type">array<mixed></span>&nbsp;<span class="var-name">$formdata</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array<mixed></span>
				<span class="var-name">$formdata</span><span class="var-description">: data from editing form.</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../../TableModels/Admins_table_row.html#methodprepareEditorSave">Admins_table_row::prepareEditorSave()</a>
							</li>
					<li>
				<a href="../../TableModels/Inventions_table_row.html#methodprepareEditorSave">Inventions_table_row::prepareEditorSave()</a>
							</li>
					<li>
				<a href="../../TableModels/Periods_table_row.html#methodprepareEditorSave">Periods_table_row::prepareEditorSave()</a>
								: Set data for this row from editor.
							</li>
					<li>
				<a href="../../TableModels/Physicists_table_row.html#methodprepareEditorSave">Physicists_table_row::prepareEditorSave()</a>
							</li>
				</ul>
	</div>
<a name="methodresetRelations" id="resetRelations"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">resetRelations</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a405">405</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Function which can reset relations data.</p>
<p class="description"><p>Called automatically in load() and loadBy() methods.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			resetRelations
		</span>
				()
			</div>
	
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../../TableModels/Inventions_table_row.html#methodresetRelations">Inventions_table_row::resetRelations()</a>
								: Reset all relations.
							</li>
					<li>
				<a href="../../TableModels/Logs_table_row.html#methodresetRelations">Logs_table_row::resetRelations()</a>
							</li>
					<li>
				<a href="../../TableModels/Miniapps_table_row.html#methodresetRelations">Miniapps_table_row::resetRelations()</a>
								: Relation reset.
							</li>
					<li>
				<a href="../../TableModels/Periods_table_row.html#methodresetRelations">Periods_table_row::resetRelations()</a>
								: Reset of relations
							</li>
					<li>
				<a href="../../TableModels/Physicists_table_row.html#methodresetRelations">Physicists_table_row::resetRelations()</a>
								: Relation resets.
							</li>
					<li>
				<a href="../../TableModels/Questions_table_row.html#methodresetRelations">Questions_table_row::resetRelations()</a>
								: Relations reset.
							</li>
				</ul>
	</div>
<a name="methodsave" id="save"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">save</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a161">161</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Saves assigned data to database table.</p>
<p class="description"><p>If there is not any data from original load(), loadBy() or setId() call, new record will be inserted to table,  otherwise existing record will be updated.</p><p>After save is completed, data from table will be loaded again.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> TRUE, if new or existing record is inserted / updated, FALSE otherwise.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			save
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsetId" id="setId"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setId</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a343">343</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets new value of primary key (primary index).</p>
	<ul class="tags">
				<li><span class="field">return:</span> reference to this object.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result"><a href="../../Abstract/Core/Abstract_table_row.html">Abstract_table_row</a></span>
		<span class="method-name">
			setId
		</span>
					(<span class="var-type">integer</span>&nbsp;<span class="var-name">$id</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$id</span><span class="var-description">: new id for this table.</span>			</li>
				</ul>
		
			
	</div>
<a name="method_getKnownFields" id="_getKnownFields"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">_getKnownFields</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a442">442</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function will return array of known table columns for this table, or NULL when  they are not read from database.</p>
	<ul class="tags">
				<li><span class="field">return:</span> table column or NULL.</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array<string>|NULL</span>
		<span class="method-name">
			_getKnownFields
		</span>
				()
			</div>
	
		
			
	</div>
<a name="method_setKnownFields" id="_setKnownFields"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">_setKnownFields</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a452">452</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This function will save array of known table columns to global memory.</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_setKnownFields
		</span>
					(<span class="var-type">array<string></span>&nbsp;<span class="var-name">$fields</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array<string></span>
				<span class="var-name">$fields</span><span class="var-description">: array of known table columns.</span>			</li>
				</ul>
		
			
	</div>
<a name="method__call" id="__call"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">__call</span> (line <span class="line-number"><a href="../../__filesource/fsource_Abstract_Core_coreabstract_table_row.php.html#a313">313</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Makes virtual set&lt;Column&gt;($value) and get&lt;Column&gt;() public method for  accessing and changing table row data.</p>
	<ul class="tags">
				<li><span class="field">return:</span> can return column value or reference to this object.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			__call
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, <span class="var-type">array<mixed></span>&nbsp;<span class="var-name">$arguments</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: method name.</span>			</li>
					<li>
				<span class="var-type">array<mixed></span>
				<span class="var-name">$arguments</span><span class="var-description">: method arguments.</span>			</li>
				</ul>
		
			
	</div>
							<h4>Inherited Methods</h4>
				<a name='inherited_methods'><!-- --></a>	
									<!-- =========== Summary =========== -->
					<p>Inherited From <span class="classname"><a href="../../Abstract/Core/Abstract_table_core.html">Abstract_table_core</a></span></p>
					<blockquote>
													<span class="method-name"><a href="../../Abstract/Core/Abstract_table_core.html#methodisCalledFrom">Abstract_table_core::isCalledFrom()</a></span><br>
													<span class="method-name"><a href="../../Abstract/Core/Abstract_table_core.html#methodisInsideTemplate">Abstract_table_core::isInsideTemplate()</a></span><br>
													<span class="method-name"><a href="../../Abstract/Core/Abstract_table_core.html#method__get">Abstract_table_core::__get()</a></span><br>
											</blockquote>
										
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Tue, 15 Jan 2013 16:53:58 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a>
	</p>
	</div></body>
</html>